package cn.iocoder.yudao.module.picturebook.service.concern;

import cn.iocoder.yudao.module.picturebook.dal.mysql.concern.ConcernMapper;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;

import javax.annotation.Resource;

@Service
@Validated
public class ConcernServiceImpl implements ConcernService {
    @Resource
    private ConcernMapper concernMapper;

    @Override
    public Boolean concern(Long concernId, Long userId) {
        return concernMapper.concern(concernId, userId) > 0;
    }

    @Override
    public Boolean cancelConcern(Long concernId, Long userId) {
        return concernMapper.cancelConcern(concernId, userId) > 0;
    }
}
